make star pattern in javascript